package com.xj.mail.controller;


import com.xj.mail.entity.Cart;
import com.xj.mail.service.ICartService;
import com.xj.order.remote.service.DemoService;
import org.apache.dubbo.config.annotation.Reference;
import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.websocket.server.PathParam;

import org.apache.logging.log4j.Logger;

import java.io.Serializable;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author xujin
 * @since 2019-08-13
 */
@Controller
@RequestMapping("/cart")
public class CartController {

    private Logger logger = LogManager.getLogger(this.getClass());

    @Reference(version = "${demo.service.version}",check = false,retries = 2)
    private DemoService demoService;

    @Autowired
    private ICartService cartService;

    @GetMapping(value = "/test/{num1}/{num2}")
    public void test(@PathVariable("num1") String num1, @PathVariable("num2") String num2) {
        demoService.sayHello("mercyblitz");
        Cart cart = cartService.getById("1");
    }

}
